package com.lc.hot100.lc300;

import java.util.Arrays;

public class Main {
	public static void main(String[] args) {
		
	}

}


class Solution {
    public int lengthOfLIS(int[] nums) {
        int n = nums.length;
        int[] f = new int[n];
        Arrays.fill(f, 1);
        int res = 0;
        for (int i = 1; i < n; i ++) {
        	for (int j = 0; j < i; j ++) {
        		if (nums[i] > nums[j]) {
            		f[i] = Math.max(f[i], f[j] + 1);
        		}
        	}
        	res = Math.max(res, f[i]);
        }
       return res;
    }
}